//
//  ZBMoBanFourViewController.m
//  MoBan
//
//  Created by apple on 16/7/11.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ZBMoBanFourViewController.h"
#import "ZBMobanFourTableviewCell.h"
#import "ZBMoBanFourtableHeadView.h"
@interface ZBMoBanFourViewController ()<UITableViewDataSource,UITableViewDelegate,ZBMoBanFourtableHeadViewDelege>
@property(nonatomic,strong)UITableView *tableview;
@property(nonatomic,strong)ZBMoBanFourtableHeadView *zbheadview;
@end

@implementation ZBMoBanFourViewController
-(ZBMoBanFourtableHeadView *)zbheadview
{
    if (!_zbheadview) {
        _zbheadview = [[ZBMoBanFourtableHeadView alloc]init];
        _zbheadview.frame = CGRectMake(0, 0, KscrW, 120*Kscr);
        _zbheadview.deleget = self;
    }
    return _zbheadview;
}
-(UITableView *)tableview
{
    if (!_tableview) {
        _tableview = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, KscrW, KscrH-KBar1)];
        _tableview.dataSource = self;
        _tableview.delegate = self;
        _tableview.tableHeaderView = self.zbheadview;
    }
    return _tableview;

}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.tableview];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    return 3;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    ZBMobanFourTableviewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ZBMobanFourTableviewCell"];
    if (!cell) {
        cell = [[ZBMobanFourTableviewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ZBMobanFourTableviewCell"];
    }
    return cell;
 
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 3;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    if (section<2) {
        return 20*Kscr;
    }
    return 0;

}
/**
 点击登录的代理方法
 */
-(void)ZBLoginToPresentVc
{

    [ZBProssHud showsuccessFrom:self.view with:@"登陆成功"];
}
-(void)ZBSelfMessage
{
    [ZBProssHud showsuccessFrom:self.view with:@"跳转个人信息"];

}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [ZBProssHud showsuccessFrom:self.view with:@"跳转"];


}
@end
